﻿///*
// * ImageTransformMatrix
// * 
// * initial implementation : 29.8.2007
// *
// * Copyright (c) Adam Sida, asida@centrum.cz.
// * All rights reserved.
// * 
// * for license see Petra.Gis.License.txt
// */
//using System;


//namespace Petra.Gis.Geometry.Support
//{
//  /// <summary>
//  /// Intergraph grid Matrix is specific transformation object for SpatialReferenceImage
//  /// this class holds transformation of <c>SpatialReferencedImage</c>
//  /// </summary>
//  public class ImageTransformMatrix
//  {

//    private double[] _matrixArray = new double[16];

//    public ImageTransformMatrix()
//    {
//      _matrixArray[0] = 1;
//      _matrixArray[1] = 0;
//      _matrixArray[2] = 0;

//      _matrixArray[3] = 0;
//      _matrixArray[4] = 1;
//      _matrixArray[5] = 0;

//      _matrixArray[6] = 0;
//      _matrixArray[7] = 0;
//      _matrixArray[8] = 1;
//    }




//    public ImageTransformMatrix(float m11, float m12, float m21, float m22, float dx, float dy)
//      : this()
//    {
//      _matrixArray[0] = m11;
//      _matrixArray[1] = m12;

//      _matrixArray[3] = m21;
//      _matrixArray[4] = m22;

//      _matrixArray[6] = dx;
//      _matrixArray[7] = dy;
//    }



//    public ImageTransformMatrix(double[] src)
//      : this()
//    {
//      if (src.Length != 16)
//        throw new ArgumentException("input array must be 16 doubles");

//      _matrixArray = src;

//    }



//    public double offsetX
//    {
//      get { return _matrixArray[6]; }
//    }




//    public double offsetY
//    {
//      get { return _matrixArray[7]; }
//    }




//    /// <summary>
//    /// Applies the specified translation vector (offsetX and offsetY) to this Matrix by prepending the translation vector.
//    /// </summary>
//    /// <param name="offsetX">The horizontal value by which to translate this Matrix.</param>
//    /// <param name="offsetY">The vertical value by which to translate this Matrix.</param>
//    public void translate(double offsetX, double offsetY)
//    {
//      _matrixArray[6] = offsetX;
//      _matrixArray[7] = offsetY;
//    }



//    /// <summary>
//    /// Applies the specified scale vector to this Matrix by prepending the scale vector.
//    /// </summary>
//    /// <param name="scaleX">The value by which to scale this Matrix in the horizontal direction</param>
//    /// <param name="scaleY">The value by which to scale this Matrix in the vertical direction</param>
//    public void scale(float scaleX, float scaleY)
//    {
//      _matrixArray[0] = scaleX;
//      _matrixArray[4] = scaleY;
//    }




//    public void scale(double scaleX, double scaleY)
//    {
//      _matrixArray[0] = scaleX;
//      _matrixArray[4] = scaleY;
//    }



//    /// <summary>
//    /// Prepend to this Matrix a clockwise rotation, around the origin and by the specified angle.
//    /// </summary>
//    /// <param name="angle">The angle of the rotation, in degrees.</param>
//    public void rotate(float angle)
//    {
//      //not implemented 
//    }




//    public double[] ToArray()
//    {
//      return _matrixArray;
//    }


//  }
//}
